# coding:utf-8
from flask import render_template, redirect, url_for, request, flash,abort

from . import blue_auth
from ..Models.models import user,Role
from .. import db


# @blue_auth.route('/hello/<name>')
# def hello(name=None):
# 	print name
# 	r = Role.query.filter_by(name='Admin').first()
# 	u = user(username='john1', password='123', email='aa@aa111.com', role=r)
# 	db.session.add(u)
# 	db.session.commit()
#
# 	return render_template('hello.html')

@blue_auth.route('/', methods=["GET","POST"])
def index():
	return render_template('auth/index.html')
	# return redirect(url_for('blue_recover.login', name="admin@localhost.org", _external=True))



@blue_auth.route('/err/', methods=["GET","POST"])
def err():
	print 123
	abort(404,)